<?php
declare (strict_types=1);

namespace app\admin\controller\student;

use app\admin\controller\Controller;
use app\admin\model\student\AnswerSheet as AnswerSheetModel;
use app\admin\model\student\AnswerSheetTopic as AnswerSheetTopicModel;
use think\db\exception\DbException;
use think\Model;

class AnswerSheetTopic extends Controller
{
    /**
     * 列表
     * @return array
     * @throws DbException
     */
    public function list()
    {
        $model = new AnswerSheetTopicModel;
        $param = $this->request->param();

        $details = AnswerSheetModel::detail($param['answer_sheet_id']);

        $list = $model->getList($param);
        return $this->renderSuccess(compact('details', 'list'));
    }
}
